<template>
  <div class="content-box perform-box">
    <nav-title title="绩效信息" :routerLink="routerLink"/>
    <div class="top_tab">
        <div>我的绩效</div>
        <div>工作总结</div>
        <div>360评语</div>
    </div>
    <div class="date_select">
        <edit-option-line label="评估年份" :vals="yearList" v-model="searchYear" @on-change="changeTime"></edit-option-line>
        <edit-option-line label="评估节点" :vals="nodeList" v-model="searchNode" @on-change="changeTime"></edit-option-line>
    </div>
    <div>
        <div class="regulations-box" v-for="performList" v-bind:key="{{index}}">
            <simple-line title="年份" v-bind:value="item.cFdYear"/>
            <simple-line title="节点" v-bind:value="item.cFdPgsjfw"/>
            <simple-line title="工作总结得分" v-bind:value="item.cFdGzzj"/>
            <simple-line title="360总得分" v-bind:value="item.cFd360"/>
            <simple-line title="KPI得分" v-bind:value="item.cFdKpi"/>
            <simple-line title="综合得分" v-bind:value="item.cFdZh"/>
            <!-- <simple-line title="绩效结果----" v-bind:value="item.year"/> -->
        </div>
    </div>
    <div>
        <div class="regulations-box" v-for="performList" v-bind:key="{{index}}">
            <simple-line title="年份" v-bind:value="item.cFdYear"/>
            <simple-line title="节点" v-bind:value="item.cFdPgsjfw"/>
            <simple-line title="直属领导" v-bind:value="item.cFdZsld"/>
            <simple-line title="直属领导评语" v-bind:value="item.cFdZsPy"/>
            <simple-line title="体系领导" v-bind:value="item.cFdTxld"/>
            <simple-line title="体系领导评语" v-bind:value="item.cFdTxPy"/>
        </div>
    </div>
    <div>
        <div class="regulations-box" v-for="p360List" v-bind:key="{{index}}">
            <simple-line title="年份" v-bind:value="item.cFdYear"/>
            <simple-line title="节点" v-bind:value="item.cFdPgmd"/>
            <simple-line title="工作建议" v-bind:value="item.cFdGzjy"/>
            <simple-line title="评估目的" v-bind:value="item.cFdPgmd"/>
            <simple-line title="评估时间" v-bind:value="item.cFdPssj"/>
            <simple-line title="调查类型" v-bind:value="item.cFdDclx"/>
        </div>
    </div>
  </div>
</template>

<script>
  import { getPyComp } from '../../api/api';
  import EditOptionLine from '../../components/basic/EditOptionLine'
  import SimpleLine from '../../components/basic/SimpleLine'
  // import { Datetime, Group, PopupRadio, dateFormat } from 'vux';
  import moment from 'moment';
  import cloneDeep from 'lodash/clonedeep';
  export default {
    name: 'Vacation',
    components: {
        EditOptionLine,
        SimpleLine
    },
    created() {
      this.eplid = this.$route.query.eplid;
      this.getData();
    },
    mounted() {},
    data() {
      return {
        performList:[],
        type: false,
        eplid: '',
        routerLink: '',
        data: {
          // pycomps: [
          //   {name: '月固薪', value: '18000'},
          //   {name: '基本工资', value: '12313'},
          //   {name: '岗位工资', value: '122'},
          //   {name: '加班工资', value: '1432'},
          // ],
          // pyMods: [
          //   {
          //     effdt: '2015-01-01',
          //     actionReason: '社会招聘',
          //     comprate: '8000',
          //   }
          // ],
          // descr1: '控股薪资计划',
          // descr2: 'M',
          // descr3: '02',
          // descr4: '常州奥克斯房产开发有限公司',
          // descr5: '控股总部-人力资源中心',
          // descr6: '上海外服',
          // descr7: '上海外服',
        }
      }
    },
    methods: {
      getData() {
        getPyComp({emplid: this.eplid})
          .then((res)=>{
            console.debug(res);
            if (res && res.retCode === "000000") {
              this.data = res.retData;
            } else {
              this.$vux.alert.show({
                title: "提示",
                content: res.retMsg
              });
            }
          })
          .catch(res => {
          this.$vux.alert.show({
            title: "警告",
            content: "网络异常，请稍后重试"
          });
        });
      },
    }
  }
</script>

<style type="text/scss" lang="scss">
  @import "../../styles/staff.scss";
</style>
